<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>下雨</title>
    <style>
      body {
        background-color: #000;
        box-sizing: border-box;
        padding: 100px;
      }
      .loader {
        position: relative;
        width: 110px;
        height: 30px;
        background-color: #fff;
        border-radius: 100px;
      }
      .loader::before {
        content: " ";
        position: absolute;
        width: 30px;
        height: 30px;
        background-color: #fff;
        border-radius: 50%;
        box-shadow: 40px 0 0 20px #fff; /* 40px x坐标 20px放大 */
        left: 10px;
        top: -20px;
      }
      .snow {
        position: relative;
        display: flex;
        z-index: 1;
      }
      .snow span {
        position: relative;
        width: 3px;
        height: 3px;
        background-color: #fff;
        margin: 0 3px;
        border-radius: 50%;
        animation: snowing 5s linear infinite;
        animation-duration: calc(15s / var(--i));
      }
      @keyframes snowing {
        0% {
          transform: translateY(0px);
        }
        70% {
          transform: translateY(100px) scale(1);
        }
        100% {
          transform: translateY(100px) scale(0);
        }
      }
    </style>
  </head>
  <body>
    <div class="loader">
      <div class="snow">
        <span style="--i: 20"></span>
        <span style="--i: 10"></span>
        <span style="--i: 15"></span>
        <span style="--i: 19"></span>
        <span style="--i: 11"></span>
        <span style="--i: 17"></span>
        <span style="--i: 12"></span>
        <span style="--i: 13"></span>
        <span style="--i: 16"></span>
        <span style="--i: 18"></span>
        <span style="--i: 14"></span>
      </div>
    </div>
  </body>
</html>
